<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/wpui-admin/wp-ewallet-admin/static/plugin/layuimini/lib/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/wpui-admin/wp-ewallet-admin/static/plugin/layuimini/css/public.css" media="all">
    <link rel="stylesheet" href="/wpui-admin/wp-ewallet-admin/static/css/wp.css" media="all">

    <style>
        .item{
            height: 50px;
            border-bottom: 1px solid #dddddd;
            line-height: 50px;
        }

        .key{
            float: left;
        }

        .value{
            float: right;
        }
    </style>
</head>
<body>
<div id="container" class="layuimini-container">
    <div class="layuimini-main">

        <h2 class="wp-module-title">归集详情查询</h2>
        <div class="wp-module-box wp-module-border">

            <div class="item">
                <div class="key">Hash</div>
                <div class="value" v-text="thId"></div>
            </div>

            <div class="item">
                <div class="key">转入</div>
                <div class="value" v-text="addressTo"></div>
            </div>

            <div class="item">
                <div class="key">转出</div>
                <div class="value" v-text="addressFrom"></div>
            </div>

            <div class="item">
                <div class="key">状态</div>
                <div class="value">
                    <a class="layui-btn layui-btn-xs layui-btn-normal layui-bg-orange" v-show="operResult==1000">归集待确认</a>
                    <a class="layui-btn layui-btn-xs layui-btn-normal layui-bg-green" v-show="operResult==2000">归集成功</a>
                    <a class="layui-btn layui-btn-xs layui-btn-normal layui-bg-red" v-show="operResult==3000">归集失败</a>
                </div>
            </div>

            <div class="item">
                <div class="key">转入币种</div>
                <div class="value" v-show="moneyTypeId==1000">USDT</div>
                <div class="value" v-show="moneyTypeId==2000">SHQC</div>
                <div class="value" v-show="moneyTypeId==3000">ETH</div>
            </div>

            <div class="item">
                <div class="key">金额</div>
                <div class="value" >
                    <span class="value" v-show="moneyTypeId==1000" style="margin-left: 5px">USDT</span>
                    <span class="value" v-show="moneyTypeId==2000" style="margin-left: 5px">SHQC</span>
                    <span class="value" v-show="moneyTypeId==3000" style="margin-left: 5px">ETH</span>
                    <span class="value" v-text="transAmount"></span>
                </div>

            </div>

            <div class="item">
                <div class="key">手续费</div>
                <div class="value" >
                    <span class="value"  style="margin-left: 5px">ETH</span>
                    <span class="value" v-text="serviceCharge"></span>
                </div>
            </div>

            <div class="item">
                <div class="key">操作时间</div>
                <div class="value" v-text="transTime"></div>
            </div>
        </div>

    </div>
</div>

<script src="/wpui-admin/wp-ewallet-admin/static/js/jquery-3.4.1.min.js"></script>
<script src="/wpui-admin/wp-ewallet-admin/static/plugin/layuimini/lib/layui/layui.js" charset="utf-8"></script>
<script src="/wpui-admin/wp-ewallet-admin/module/index/config.js" charset="utf-8"></script>
<script src="/wpui-admin/wp-ewallet-admin/global/wp.js" charset="utf-8"></script>
<script src="/wpui-admin/wp-ewallet-admin/static/js/vue.js" charset="utf-8"></script>
<script src="/wpui-admin/wp-ewallet-admin/static/js/vue-i18n.js" charset="utf-8"></script>
<script src="/wpui-admin/wp-ewallet-admin/global/wp-i18n.js" charset="utf-8"></script>
<script src="/wpui-admin/wp-ewallet-admin/global/wp-project.js" charset="utf-8"></script>
<script>
    layui.use(['form', 'table'], function () {
        var $ = layui.jquery,
            form = layui.form,
            table = layui.table;

        var vm = new Vue({
            el: '#container',
            i18n: wp.i18n(),
            data: {
                name:'张三',
                thId: '',
                addressTo:'',
                addressFrom:'',
                operResult:'',
                moneyTypeId:'',
                transAmount:'',
                serviceCharge:'',
                transTime:'',
            },
            mounted: function () {
                this.getCollectionLogByLogId();
            },
            methods: {
                getCollectionLogByLogId: function () {
                    var data = window.data;
                    var that = this;
                    wp.httpGet({
                        url: wp.url("/wp/ewallet/wallet/transAccount/getLogById"),
                        data: {
                            logId: data.logId,
                        },
                        success: function (data) {
                            // console.log(JSON.stringify(data.dataBody));
                            $.extend(that,data.dataBody);
                            that.exchange();
                            that.$nextTick(function(){
                                // 赋值完后再次渲染表单下拉框方可正常选中
                                form.render();
                            });
                        }
                    })
                }
            }
        });

    });
</script>

</body>
</html>